import request from '@/utils/request'
// 获取人员进出管理列表
export const ListDutyManagement = (params, page, size) => {
  return request({
    url: `/opermgt/accessRecord/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}
/**
 * 人员进出管理保存
 * @param {*} data
 * @returns
 */
export const DutyManagementSave = (data) => {
  return request({
    url: '/opermgt/accessRecord',
    method: 'POST',
    data: data
  })
}
//获取值班记录表
export const RecordsDutyList = (params, page, size) => {
  return request({
    url: `/opermgt/arrangeRecord/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}
/**
 * 人员进出管理保存
 * @param {*} data
 * @returns
 */
export const RecordsDutySave = (data) => {
  return request({
    url: '/opermgt/arrangeRecord',
    method: 'POST',
    data: data
  })
}
// /值班类型下拉列表
export const ComDutyTypeDrop = () => {
  return request({
    url: '/opermgt/arrangeRecord/selectType'
  })
}

// 人员排班查询
export const selectArrangeRecord = (type) => {
  return request({
    url: `/opermgt/arrangeRecord/selectArrangeRecord/${type}`,
    method: 'POST',
  })
}
//人员排班保存
export const saveArrangeRecord = (data) => {
  return request({
    url: '/opermgt/arrangeRecord/saveArrangeRecord',
    method: 'POST',
    data: data
  })
}
//获取所有人员信息
export const selectAllPerson = () => {
  return request({
    url: '/sys/user',
    method: 'GET',
  })
}
